<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>datd</title>
    <style>
        body {
            font-family: 'Arial', sans-serif;
            background: #f0f4f5;
            line-height: 1.8;
            color: #333;
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }

        header {
            background: white;
            padding: 20px 0;
            border-bottom: 1px solid #e0e0e0;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        header h1 {
            margin: 0;
            padding: 10px 0;
            font-size: 2.5rem;
            text-align: center;
            color: #369341;
        }

        nav ul {
            list-style: none;
            display: flex;
            justify-content: center;
            padding: 20px 0;
        }

        nav ul li {
            margin: 0 10px;
        }

        nav a {
            display: block;
            padding: 10px 20px;
            color: white;
            text-decoration: none;
            background: #4caf50;
            border-radius: 30px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
            transition: background-color 0.3s ease, transform 0.3s ease;
        }

        nav a:hover {
            background-color: #3e8e41;
            transform: translateY(-2px);
        }

        main {
            flex-grow: 1;
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            grid-template-rows: auto;
            gap: 30px;
            padding: 30px;
            max-width: 1200px;
            margin: 0 auto;
        }

        section {
            padding: 20px;
            background: white;
            border: 1px solid #e0e0e0;
            border-radius: 30px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
            text-align: justify;
            transition: box-shadow 0.3s ease, transform 0.3s ease;
        }

        section:hover {
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
            transform: translateY(-5px);
        }

        section h2 {
            margin-bottom: 20px;
            font-size: 1.5rem;
            color: #369341;
        }

        section p {
            font-size: 1rem;
        }

        footer {
            background: #333;
            color: white;
            text-align: center;
            padding: 20px 0;
            font-size: 0.9rem;
        }

        @media (max-width: 768px) {
            main {
                grid-template-columns: 1fr;
            }
            nav ul {
                flex-direction: column;
                align-items: center;
            }
            nav ul li {
                margin: 10px 0;
            }
        }
        /* 关键帧动画 */
        @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
        }

        @keyframes slideInFromLeft {
        from { transform: translateX(-100%); opacity: 0; }
        to { transform: translateX(0); opacity: 1; }
        }

        @keyframes slideInFromRight {
        from { transform: translateX(100%); opacity: 0; }
        to { transform: translateX(0); opacity: 1; }
        }

        @keyframes scaleUp {
        from { transform: scale(0.5); opacity: 0; }
        to { transform: scale(1); opacity: 1; }
        }

        /* 进场动画的通用设置 */
        .animated {
        animation-duration: 1s;
        animation-fill-mode: both;
        animation-delay: var(--animation-delay);
        }

        /* 动画类 */
        .fadeIn { animation-name: fadeIn; }
        .slideInFromLeft { animation-name: slideInFromLeft; }
        .slideInFromRight { animation-name: slideInFromRight; }
        .scaleUp { animation-name: scaleUp; }

        /* 响应式设计 */
        @media (max-width: 768px) {
        /* 调整响应式布局的动画 */
        }       
    </style>
</head>
<body>

    <header>
        <h1>猪猪的小天地</h1>
        <nav>
            <ul>
                <li><a href="#about">关于我</a></li>
                <li><a href="#posts">广告位</a></li>
                <li><a href="#projects">项目介绍</a></li>
                <li><a href="#contact">联系方式</a></li>
            </ul>
        </nav>
    </header>

    <main>
        <section id="about">
            <h2>关于我</h2>
            <p>肯定是猪哥做的</p>
        </section>

        <section id="posts">
            <h2>广告位</h2>
            <p>联想小新14pro</p>
        </section>

        <section id="projects">
            <h2>项目介绍</h2>
            <p>实验性前端仅供参考</p>
        </section>

        <section id="contact">
            <h2>联系方式</h2>
            <p>github.com/zhuzhudashuaibi</p>
        </section>
    </main>


</body>
</html>
